package com.secf.service.action.hpy.mc.scjcjd.test;

/**
 * @Author luoYong
 * @Date 2024-08-09 17:23
 */
public class BoxingTest {
    public static void main(String[] args) {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a == b); // true, 因为在缓存范围内

        Integer c = 200;
        Integer d = 200;
        System.out.println(c == d); // false, 因为不在缓存范围内

        int sum = c + d; // 自动拆箱，再加法
        System.out.println("Sum: " + sum);
    }
}